#ifndef TIMER_H
#define TIMER_H

#include <time.h>

#define TIMER_NUMBERS 5

typedef enum { DEFAULT, SPEED, HALF_SPEED, SLOW } timer_type;

typedef struct Timer {
	unsigned long int count;
	clock_t slice, last;
	void (*tick)(struct Timer *this);
	void (*set)(struct Timer *this, int i);
	void (*step)(struct Timer *this, int i);
	void (*reset)(struct Timer *this);
	void (*start)(struct Timer *this);
	int (*isOver)(struct Timer *this);

} Timer;

Timer *makeTimer(timer_type t);

Timer *timer[TIMER_NUMBERS];

#endif


